﻿ 
	<?php
	echo form_open("http://localhost/ci3/".index_page()."/account/login");
echo "<li>username ".form_input("username", set_value("username")). form_error("username")."</li>";
echo "<li>password ".form_input("password", set_value("password")). form_error("password")."</li>";

	?>
 	<!--	添加 百度uedit
  	<textarea rows="0" cols="0"  style="resize:none;" id="ed1" type="" name="type"> </textarea>   


		<div class="row">
            <label for="mod-captcha-code">验证码</label>
            <input name="code" id="mod-captcha-code" size="6" class="zjcaptcha" style="width:80px" type="text"/> 
            <img class="code-img" style="height:30px;width:80px;" src="http://localhost/ci3/lib/code.php?t=0" onclick="this.src=this.src.substring(0,this.src.indexOf('?')+1)+Math.random();return false;" />
   
            <label class="yzmtips" style="color:red"> </label> 
        </div>
   -->
            <input type="submit" value="提交" class="submitBtn"/>
        
 


	</div>

</div>
</div>


  	<!--	添加 百度uedit
  	
  <script type="text/javascript"> 
  var ue = UE.getEditor('ed1',{
  autoHeight: false,initialFrameHeight:400,initialFrameWidth:800, 
  autoHeightEnabled: true,
  autoFloatEnabled: true
});
</script>
 


<script>
(function($){
    $(document).ready(function(){
        $(".submitBtn").click(function() {
            var obj = $(this);
            $.ajax({
                url:'http://localhost/ci3/lib/codep2.php',
                type:'POST',
                data:{code:$.trim($("input[name=code]").val())},
                dataType:'json',
                async:false,
                success:function(result) {
                    if(result.status == 1) {
                        obj.parents('form').submit(); //验证码正确提交表单
                    }else{
                        $(".code-img").click();
                        $(".yzmtips").html('验证码错误！');
                        setTimeout(function(){
                            $(".yzmtips").empty();
                        },3000);
                    }
                },
                error:function(msg){
                    $(".yzmtips").html('Error:'+msg.toSource());
                }
            })
            return false;
        })
    });
})(jQuery);
</script>-->



 